package annotation;

import com.gao.EmpService;
import com.gao.mapper.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Emp;

import java.util.List;

@Service
public class EmpServiceImplByAnnotation implements EmpService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public void show() {
        System.out.println(empMapper);

        List<Emp> all = empMapper.findAll();
        for (Emp emp : all) {
            System.out.println(emp);
        }
    }
}
